﻿<?php 
date_default_timezone_set("PRC");
require './libs/Smarty.class.php';
require 'news.class.php';
$smarty = new Smarty;
$smarty->force_compile = true;
//$smarty->debugging = true;
$smarty->compile_dir = 'saemc://smartytpl/';
$smarty->cache_dir = 'saemc://smartytpl/';
$smarty->compile_locking = false;
$smarty->caching = true;
$smarty->cache_lifetime = 120;
$news=new get_news();
$news_list=$news->get_news_s();
$notice=$news->get_newss("notice");
$department=$news->get_newss("department");
$scientific=$news->get_newss("scientific");
$activity=$news->get_newss("activity");
$notice_title="公告信息";
$department_title="系部信息";
$scientific_title="科研信息";
$activity_title="活动文化";
$news_list_title="最新新闻";
$result=array(
    'notice_title' => $notice_title, 'notice' => $notice,
    'department_title'=>$department_title,'department'=>$department,
    'scientific_title'=>$scientific_title,'scientific'=>$scientific,
    'activity_title'=>$activity_title,'activity'=>$activity,
    'news_list_title'=>$news_list_title,'news_list'=>$news_list
);
//var_dump($department);
$smarty->assign($result);
$smarty->display('index.tpl');
?>